-
Notifications
You must be signed in to change notification settings - Fork 3.7k
refactor: ♻️ Refactor the cli Tool type to align better with core #8374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 21 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="extensions/cli/src/tools/index.tsx">
<violation number="1" location="extensions/cli/src/tools/index.tsx:253">
Iterating over the schema object means you only ever see keys like "type" and "properties", so required argument names are never checked. Please iterate over `tool.function.parameters.properties` instead.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 20 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="extensions/cli/src/stream/streamChatResponse.helpers.ts">
<violation number="1" location="extensions/cli/src/stream/streamChatResponse.helpers.ts:313">
Moving getAllAvailableTools() outside the per-tool try/catch means any setup failure (e.g., model service not initialized) now rejects preprocessStreamedToolCalls entirely instead of producing a handled tool error. Please restore the await inside the try so thrown errors are caught and reported.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| // Get all available tools | ||
|
|
||
| // Get all available tools | ||
| const availableTools: Tool[] = await getAllAvailableTools(isHeadless); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving getAllAvailableTools() outside the per-tool try/catch means any setup failure (e.g., model service not initialized) now rejects preprocessStreamedToolCalls entirely instead of producing a handled tool error. Please restore the await inside the try so thrown errors are caught and reported.
Prompt for AI agents
Address the following comment on extensions/cli/src/stream/streamChatResponse.helpers.ts at line 313:
<comment>Moving getAllAvailableTools() outside the per-tool try/catch means any setup failure (e.g., model service not initialized) now rejects preprocessStreamedToolCalls entirely instead of producing a handled tool error. Please restore the await inside the try so thrown errors are caught and reported.</comment>
<file context>
@@ -309,12 +309,16 @@ export async function preprocessStreamedToolCalls(
// Get all available tools
+ // Get all available tools
+ const availableTools: Tool[] = await getAllAvailableTools(isHeadless);
+
// Process each tool call
</file context>
✅ Addressed in a8f6c10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 2 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
- Fixed validateToolCallArgsPresent to iterate over tool.function.parameters.properties
- Previously iterated over schema object keys like 'type' and 'properties'
- Now correctly validates actual parameter names against required arguments
- Added null safety with ?? {} fallback for undefined properties
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
- Fixed formatting in searchCode.ts and writeChecklist.test.ts - Ensures code style compliance with project standards Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Fix incorrect direct property access on Tool objects - Update all tool references to use tool.function.name instead of tool.name - Update tool property access to use tool.function.description and tool.function.parameters - Fix convertMcpToolToContinueTool to return proper Tool structure with function property - Resolve TypeScript errors across CLI tool handling components Affected files: - extensions/cli/src/tools/index.tsx - extensions/cli/src/permissions/permissionChecker.ts - extensions/cli/src/services/ToolPermissionService.ts - extensions/cli/src/stream/handleToolCalls.ts - extensions/cli/src/stream/streamChatResponse.helpers.ts
- Add optional chaining to safely access tool.function.name property - Fix mock tool structure in tests to match real tool interface - Resolves TypeError: Cannot read properties of undefined (reading 'name') - All 126 permission tests now pass Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Add optional chaining to safely access t.function?.name in ToolPermissionService - Add additional null check to filter out undefined names - Prevents TypeError when accessing function property on tools - Ensures robustness when working with tool collections - All 64 ToolPermissionService tests passing Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Comprehensive guide for using Atlassian Rovo MCP with Continue - Covers Jira, Confluence, and Compass workflows - Includes natural language examples for TUI and headless modes - Provides GitHub Actions automation examples - Documents OAuth setup, troubleshooting, and admin considerations Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Added to Cookbooks section in docs.json - Added to MCP Integration Cookbooks in guides/overview.mdx - Positioned after GitHub MCP cookbook for logical flow Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Changed quick start to use continuedev/atlassian-continuous-ai-confluence-agent - Updated all headless mode examples to use --agent flag instead of --config/-p - Simplified first command to show direct agent invocation - Updated GitHub Actions examples to use the agent URL - Removed --auto flag as it's implicit with direct command format Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
Major changes: - Split Quick Start into two tabs: Jira Agent and Confluence Agent - Added Agent Quick Reference table for easy comparison - Updated all Jira workflow examples to use the Jira agent - Kept all Confluence workflow examples with the Confluence agent - Updated Compass workflows to use Jira agent (component-focused) - Added guidance notes for cross-product workflows - Included shell alias tips for both agents - Updated GitHub Actions examples to use appropriate agents All workflow examples now use the correct specialized agent: - Jira Agent: continuedev/atlassian-continuous-ai-jira-agent - Confluence Agent: continuedev/atlassian-continuous-ai-confluence-agent Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Updated cross-product workflows note to include custom agent option - Added link to Atlassian MCP on Continue Hub - Clarifies that users can create their own agents with the MCP Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
Major improvements: - Changed from Cards to AccordionGroups for better scanability - Removed dual TUI/headless examples - now showing single command format - Added Info callouts explaining headless mode: add -p flag and --auto - Emphasized OAuth authentication requirement before headless mode - Simplified all examples to show direct command format - Added inline comments in combined workflows to clarify agent choice - Reduced redundancy and improved readability The accordion format is more compact and easier to scan through multiple examples. Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
- Removed entire GitHub Actions automation section - Removed example workflows (sprint summary and doc sync) - Updated What You've Built section to remove automation reference - Updated Next Steps to remove GitHub Actions setup step - Simplified focus to interactive and headless CLI usage Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
Updated the Two Specialized Agents callout to emphasize: - These are ready-to-use agents to help users get started fast - Pre-configured with optimized prompts, rules, and Atlassian MCP - Users don't have to use them, but they provide the best experience - Users can create their own custom agents instead Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
* fix: show md rules and prompts in respective sections * Update core/config/markdown/loadMarkdownRules.ts Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Revert "Update core/config/markdown/loadMarkdownRules.ts" This reverts commit cf0faba. * Revert "fix: show md rules and prompts in respective sections" This reverts commit b19726b. * fix: skip invokable prompt files also read .md files from prompt folders * remove debug statements * simplify if block --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
….mdx
- Replace markdown bullet list with CardGroup and Card components
- Add appropriate icons for each cookbook (book, github, atlassian, chart-line, globe, gauge, database, bug, shield, pipe)
- Set cols={2} for two-column layout
- Preserve all descriptions and links
Fixes CON-4547
Co-authored-by: Username <nate@continue.dev>
Generated with [Continue](https://continue.dev)
Co-Authored-By: Continue <noreply@continue.dev>
- Add info callouts explaining tool permission levels (allow/ask/exclude) - Document differences between TUI and headless mode tool availability - Clarify that 'ask' permission tools are excluded in headless mode - Provide guidance on choosing between TUI and headless modes - Reference PR continuedev#8416 implementation Fixes CON-4622 Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: Username <nate@continue.dev>
Replaces outdated discord.gg/continue vanity link with discord.gg/vapESyrFmJ for consistency with other documentation files. Fixes continuedev#8448
…ignature - Add environment variable check in systemMessage.ts - Update README.md with documentation - Allows users to disable the Continue commit signature in generated commits
* feat: add GPT-5 Codex model support - Add GPT-5 Codex to llm-info package with 500k context and 150k max tokens - Add model definition to models.ts for UI configuration - Include GPT-5 Codex in OpenAI provider packages list - Model supports chat and edit roles with tool_use capability * feat: impl Responses API in oai-adapters * fix chat describer * Update openai.ts * fix llm-info * address dallin's feedback
Added an Info callout to the Local Models section in /customization/models that directs users to the Ollama setup guide for a quick walkthrough. Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev> Co-authored-by: bekah-hawrot-weigel <bekah@continue.dev>
) * feat: Use the correct FIM template for Granite 4 models Branch: GraniteFourTemplates Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> * feat: Add granite4 name variants to the list of models that natively support tools Branch: GraniteFourTemplates Signed-off-by: Gabe Goodhart <ghart@us.ibm.com> --------- Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Remove @continue.dev filter for account level MCPs - Made remote sessions (account-level MCPs) generally available to all authenticated users - Removed email domain restriction from shouldEnableRemoteSessions() and listRemoteSessions() in ControlPlaneClient - Removed email domain restriction from getRemoteSessions() in CLI session management Generated with [Continue](https://continue.dev) Co-authored-by: continue[bot] <continue[bot]@users.noreply.github.com> Co-authored-by: Continue <noreply@continue.dev> Co-authored-by: Nate <nate@continue.dev>
…t.ts - Replace t.name with t.function?.name for tool name access - Add .filter(Boolean) to remove any undefined names from the array - Ensures consistent tool name access pattern across all test files - All 18 agent file integration tests now pass - Maintains consistency with other permission service fixes Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <noreply@continue.dev>
ca9e5a2 to
ff386a8
Compare
Description
Noticed the CLI and Core "Tool" type had a misaslignment around how a function was defined. This change aligns the function defintion making it easier to share tools between core and the cli. Also eliminates potential issues in the OpenAPI adapters when using tools between core and the cli.
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
Updated tests as needed.
Summary by cubic
Refactors the CLI Tool type to use a function schema (type: "function" with function {name, description, parameters}), aligning with core and preventing mismatches. Also improves required-arg validation, permission handling, and error handling to prevent runtime errors.
Refactors
Migration
Written for commit ff386a8. Summary will update automatically on new commits.